package Middleware;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

public interface IServer extends Remote {
	ArrayList<String> getRoomNames() throws RemoteException;
	IRoom[] getRooms() throws RemoteException;
	IRoom getRoom(String owner) throws RemoteException;
	IRoom getRoomByKey(String key) throws RemoteException;
	IRoom createRoom(IPlayer user,int maxPlayers) throws RemoteException;
	IPlayer requestLogin(String username,String password) throws RemoteException;
	void requestLogout(IPlayer user) throws RemoteException;
	boolean bet(String username,int amount)throws RemoteException;
	void addWinnings(String username,double amount) throws RemoteException;
	<T> ArrayList<T> read(String path) throws RemoteException;
}
